package com.wuad.platformwuad.module.study.throwable;

import lombok.extern.slf4j.Slf4j;

/**
 * 异常
 *
 * @author wuaodi
 * 2025/4/14
 */
@Slf4j
public class ExceptionDemo {

    public static void main(String[] args) {
        try {
            String[] str = {"0","1","2","3","4"};
            log.info(str[5]);
        } catch (Exception e) {
            e.printStackTrace();
            log.info("1111:{}", e);
            log.info("222222:{}", e.getMessage());
            log.info("333333:{}", e.getCause());
            log.info("4444444:{}", e.getLocalizedMessage());
            log.info("555555555:{}", e.toString());
        }

    }
}
